import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    "User":[
      {
        "id":"canwin999",
        "passworld":123456,
        "iphone":18090516745
      }
    ],
    "whichConputedMethod":0,
    "nowNumber":0,
    "isLook":true,
    "knowlegeCount":0,
    "AchievementValue":0
  },
  getters: {
  },
  mutations: {
    ADD(use1,use2){
     use1.User.push({"id":use2.number,"passworld":use2.pass,"iphone":use2.iphone})
    },
    CONPUTEDMETHOD(number1,number2){
      number1.whichConputedMethod=number2
    },
    ISLOOK(number1,number2){
      number1.isLook=number2
    },
    ADDKNOWLEAGE(number1,number2){
      number1.knowlegeCount++
    },
    ADDACHIEVEMENT(number1,number2){
      number1.AchievementValue++
    }
  },
  actions: {
  },
  modules: {
  },
  plugins: [createPersistedState()]
})
